@use '@scss/common' as *;

.wrapper {
  display: block;
  position: relative;
  padding: 2.5rem;
  text-decoration: none;
  margin-bottom: 5.4rem;

  .scanline {
    transition: opacity 0.3s;
  }

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1px;
    right: 1px;
    height: 100%;
    background-color: var(--theme-elevation-0);
    transition: background-color 0.3s;
  }

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--theme-elevation-1000);
    transition: width 0.3s;
  }

  @include mid-break {
    padding: 1.5rem;
  }

  &:hover {
    &::before {
      background-color: var(--theme-elevation-50);
    }

    &::after {
      width: 100%;
    }
  }
}

.scanline {
  width: calc(100% - 2px);
  border-top: 1px solid var(--grid-line-dark);
  border-bottom: 1px solid var(--grid-line-dark);

  @include data-theme-selector('dark') {
    border-color: var(--grid-line-dark);
  }

  @include data-theme-selector('light') {
    border-color: var(--grid-line-light);
  }
}

.contentWrapper {
  position: relative;
  display: flex;
  align-items: center;

  @include mid-break {
    flex-direction: column;
  }
}

.content {
  width: 50%;
  flex-grow: 2;
  text-decoration: none;

  @include mid-break {
    width: 100%;
  }
}

.title {
  margin: 0;
  margin-bottom: 1.2rem;
}

.meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0.5;
  margin-bottom: 1.2rem;

  time {
    @include body;
  }

  p {
    margin: 0;
  }
}

.description {
  margin: 0;
}

.media {
  flex-shrink: 1;
  max-width: 50%;
  padding-right: 2.5rem;

  @include mid-break {
    width: 100%;
    padding: 0;
    margin-bottom: 2.5rem;
    max-width: 100%;
  }
}

.date {
  @include body;
}

.crosshair {
  position: absolute;
  height: auto;
  width: 1.25rem;
  opacity: 0.75;
}

.crosshairTopLeft {
  top: -0.625rem;
  left: -0.625rem;
}

.crosshairTopRight {
  top: -0.625rem;
  right: -0.625rem;
}

.crosshairBottomLeft {
  bottom: -0.625rem;
  left: -0.625rem;
}

.crosshairBottomRight {
  bottom: -0.625rem;
  right: -0.625rem;
}
